// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/13/2015 8:26:02 PM				
// -----------------------------

#ifndef _Timer_h
#define _Timer_h

#include "Common.h"

namespace Flow
{

	class Timer
	{
	public:
		Timer();
		Timer(const Timer& refTimer);
		Timer& operator=(const Timer& refTimer);
		~Timer();

		// Reset the Timer
		void	Reset();
		// Update the Timer
		void	Update();

		// Get the total running time of the Timer
		Float	GetElapsedTime() const;
		// Get the time between updates of the Timer
		Float	GetDeltaTime() const;

	private:

		Float	ConvertToSeconds(UInt64 ticks) const;

		UInt64	m_uFrequency;
		UInt64	m_uStartTime;
		UInt64	m_uLastTime;
		UInt64	m_uThisTime;

	};

}

#endif